# coding=utf-8
import maya.cmds as cmds
import maya.mel as mel
import os
import time
#def GetCamera():
#	cmds.ls(type ='camera' )
#	perspCameras = cmds.listCameras( p=True )
#	persp = ['persp']
#	camera = set(perspCameras) - set(persp)
#	camera = list(camera)
#	return camera
	
def ThreeCamera_win():
	CamwindowName = 'ThreeCamera'
	if cmds.window (CamwindowName,ex = 1):
		cmds.deleteUI (CamwindowName)
	cmds.window (CamwindowName,sizeable=1,w=960,h=540)
	
	cmds.paneLayout('ThreeCameraPaneLayout')
	a=cmds.modelPanel(mbv=0,editString = 0)

	cmds.ls (type = 'camera')
	perspCameras = cmds.listCameras (p = True)
	persp = ['persp']
	camera = set (perspCameras) - set (persp)

	listCams = list (camera)
	for i in range(len(listCams)):
		cmds.setFocus(a)
		cmds.modelEditor( a, edit=True, camera= listCams[i],pluginObjects =['gpuCacheDisplayFilter' ,1],displayAppearance = 'points',rnm='vp2Renderer',dimensions=0,polymeshes =1,textureDisplay = 'modulate',displayTextures = 1,shadows = 0,textures = 0,joints = 0,jointXray = 0,imagePlane = 0,ikHandles = 0,nurbsCurves = 0,objectFilterShowInHUD = 0)#headsUpDisplay = 0,
	barLayout = cmds.modelPanel(a, q=1, bl=1)
	print barLayout
	toDelete = cmds.frameLayout(barLayout, q=1, childArray=1)
	cmds.deleteUI(toDelete)
	cmds.showWindow(CamwindowName)